<div class="row-fluid">
    <?php echo $this->Form->create("Menuitem",array("class"=>"span12 widget stacked dark form-horizontal bordered"));?>
        <header><h4 class="title">Nhập thông tin</h4></header>
        <section class="body">
            <div class="body-inner">
                <div class="control-group">
                    <label class="control-label"><?php echo __("title");?></label>
                    <div class="controls">
                        <?php
                            echo $this->Form->input("name", array(
                                "div" => array(
                                    "title" => "Tiêu đề"
                                ),
                                "label" => false
                            ));
                        ?>
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label"><?php echo __("Đường dẫn");?></label>
                    <div class="controls">
						<div class="input-append">
                        <?php
                            echo $this->Form->input("url", array(
                                "div" => array(
                                    "title" => "Đường dẫn",
                                    'style'=>'display:inline',
                                ),
                                "label" => false,
                                "value" => "#"
                                // ,"disabled" => true
                            ));
                        ?>
                        <span class="add-on pointer" data-toggle="modal" data-target="#modal" ><span class="icon icon-search"></span></span></div>
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">Menu cha</label>
                    <div class="controls">
                        <?php
                        echo $this->Form->select("parent_id", $parent,array(
								"div" => array(
									"class" => "span12",
								),
								"label" => false,
								"class" => "select2",
                                "empty" => "Chọn 1 mục"
							));
                        ?>
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">Loại menu</label>
                    <div class="controls">
                        <?php
							echo $this->Form->input("menus_id", array(
								"div" => array(
									"class" => "span12",
								),
								"label" => false,
								"class" => "select2"
							));
                        ?>
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">Trạng thái</label>
                    <div class="controls">
                        <?php
                            echo $this->element("libs/status");
                        ?>
                    </div>
                </div>
                <!-- Form Action -->
                <div class="form-actions">
                    <?php
                        echo $this->Form->button("Submit",array("type" => "submit","class"=>"btn btn-primary","div"=>false));
                        echo "&nbsp;";
                        echo $this->Form->button("Reset", array("type" => "reset","class"=>"btn","div"=>false));
                    ?>
                </div><!--/ Form Action -->
            </div>
        </section>
   <?php echo $this->Form->end();?>

<form class="form-horizontal modal hide" id="modal">
	<div class="row-fluid">
		<div class="modal-header">
			<h4 id="myModalLabel">Chọn url</h4>
		</div>
		<div class="modal-body">
			<table class="table">
				<tr>
					<td>
                        <?php
                            $controllers = $this->requestAction('admin/menuitems/link_chooser');
                            //debug($controllers);
                            foreach ($controllers as $key => $value) {
                                echo $key;
                            }
                        ?>
                    </td>
				</tr>
			</table>
		</div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
		</div>
	</div>
</form>